<script setup lang="ts">
import TodoApp from './components/todo/TodoApp.vue'

// 从环境变量获取应用标题
const appTitle = import.meta.env.VITE_APP_TITLE || 'Vue TodoList 应用'
</script>

<template>
  <div class="app">
    <header class="app-header">
      <img alt="Vue logo" class="logo" src="./assets/logo.svg" width="80" height="80" />
      <h1 class="app-title">{{ appTitle }}</h1>
    </header>

    <main>
      <TodoApp />
    </main>
    
    <footer class="app-footer">
      <p>Vue 3 + TypeScript + Vite</p>
    </footer>
  </div>
</template>

<style>
:root {
  --primary-color: #41b883;
  --secondary-color: #35495e;
  --light-bg: #f8f9fa;
  --border-color: #eaeaea;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Avenir', Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  margin: 0;
  padding: 0;
  background-color: #f5f7fa;
  color: #2c3e50;
  min-height: 100vh;
}

.app {
  display: flex;
  flex-direction: column;
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
  min-height: 100vh;
}

.app-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px dashed var(--border-color);
}

.logo {
  margin-bottom: 10px;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

.app-title {
  color: var(--secondary-color);
  font-size: 1.8rem;
  font-weight: 600;
}

main {
  flex: 1;
}

.app-footer {
  margin-top: 40px;
  text-align: center;
  color: #999;
  font-size: 0.8rem;
  padding: 20px 0;
}
</style>
